package com.woniu.tms.mapper;

import com.woniu.tms.entity.Permission;
import com.woniu.tms.entity.User;
import com.woniu.tms.entity.UserExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer uid);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer uid);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> listTmBySid(Integer uid);

    int selectByName(String uname1);

    void addUser(User userResord);

    void updateUserByName(User userResord);

    void updateByUid(Integer id);

    List<Permission> getPermissions(Integer uid);
}